package cn.tedu.shoot;

import java.awt.image.BufferedImage;

//大敌机
public class BigAirplane extends FlyingObject implements EnemyScore{
	private int ySpeed;
	public BigAirplane() {
		super(256, 128);
		ySpeed = (int)(Math.random()*8+2);
	}

	public void step() {
		y += ySpeed;// y+(向下）
	}

	int index = 1;

	public BufferedImage getImage() {
		if (isLive()) {
			return Images.bairs[0];
		} else if (isDead()) {
			BufferedImage img = Images.bairs[index++];
			if (index == Images.bairs.length) {
				state = REMOVE;
			}
			return img;
		}
		return null;
	}
	public int getScore() {
		return 3;
	}

}
